<?php

namespace App\Services;


use App\Models\CourseSection;

class CourseSectionService extends BaseService
{
    /**
     * 获取列表
     * @return
     */
    public function list($sort,$order,$name,$course_id) {
        $query = CourseSection::query();
        if(!empty($name)){
            $query->where('name','like',"%$name%");
        }
        if(!empty($course_id)){
            $query->where('course_id','like',"%$course_id%");
        }
        return $query->orderBy($sort,$order)->get();
    }
}
